#include "menu.h"
#include<QWidget>
#include"equipmentshop.h"
#include"message.h"
menu::menu()
{
    this->setGeometry(0,0,1540,800);
    this->setGeometry(350,120,850,600);
    startButton=new QPushButton("开始游戏",this);
    startButton->move(360,280);
    startButton->resize(100,50);
    setFixedSize(1540,800);
    setFixedSize(850,600);
    setWindowTitle("");
    connect(startButton,&QPushButton::clicked,this,&menu::gotogame);
}
void menu::paintEvent(QPaintEvent*event)
{
    QPainter painter(this);
    painter.drawPixmap(0,0,850,600,QPixmap(":/images/myImages/menu.png"));
   // painter.drawPixmap(0,0,1540,800,QPixmap(":/images/myImages/menu.png"));
}
void menu::gotogame()
{
    this->hide();
    Equipmentshop *equipmentshop1=new Equipmentshop();
    equipmentshop1->menu1=this;
    //connect(equipmentshop1,SIGNAL(sendsignal()),this,SLOT(reshow()));
    equipmentshop1->show();
}
void menu::reshow()
{
    this->show();
}
